<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/SearchResponse">
<NativeResult>
	<Success><xsl:value-of select="ReturnStatus/Success" /></Success>
        <session>
        <xsl:for-each select="PropertyResults/PropertyResult">
            <Hotel>
                <hotel_id_lowcostbeds><xsl:value-of select="PropertyID" /></hotel_id_lowcostbeds>
                <hotel_name><xsl:value-of select="PropertyName" /></hotel_name>
                <lowcostbeds_rating><xsl:value-of select="Rating" /></lowcostbeds_rating>
                <official_rating><xsl:value-of select="Rating" /></official_rating>
                <hotel_description><xsl:value-of select="Description" /></hotel_description>
                <hotel_country><xsl:value-of select="Country" /></hotel_country>
                <hotel_destination><xsl:value-of select="Resort" /></hotel_destination>
                <hotel_resort><xsl:value-of select="Resort" /></hotel_resort>
                <hotel_photos><xsl:value-of select="MainImageThumbnail" /></hotel_photos>
                <Rooms>   
               
                
                    <xsl:if test="RoomTypes != ''">
                        <xsl:for-each select="RoomTypes/RoomType">
                            <xsl:if test="Seq = '1'">
                                <Room_1>
                                    <Passengers>
                                          <Adults><xsl:value-of select="Adults" /></Adults>
                                          <Children><xsl:value-of select="Children" /></Children>
                                    </Passengers>
                                    <Room>
                                        <ID><xsl:value-of select="PropertyRoomTypeID" /></ID>
                                        <Type><xsl:value-of select="RoomType" /></Type>
                                        <Board><xsl:value-of select="MealBasis" /></Board>
                                        <Rate><xsl:value-of select="Total" /></Rate>
                                    </Room>
                                </Room_1>    
                            </xsl:if>   
                            
                            <xsl:if test="Seq = '2'">
                                <Room_2>
                                    <Passengers>
                                          <Adults><xsl:value-of select="Adults" /></Adults>
                                          <Children><xsl:value-of select="Children" /></Children>
                                    </Passengers>
                                    <Room>
                                        <ID><xsl:value-of select="PropertyRoomTypeID" /></ID>
                                        <Type><xsl:value-of select="RoomType" /></Type>
                                        <Board><xsl:value-of select="MealBasis" /></Board>
                                        <Rate><xsl:value-of select="Total" /></Rate>
                                    </Room>
                                </Room_2>                                    
                            </xsl:if>   
                            <xsl:if test="Seq = '3'">
                                 <Room_3>
                                    <Passengers>
                                          <Adults><xsl:value-of select="Adults" /></Adults>
                                          <Children><xsl:value-of select="Children" /></Children>
                                    </Passengers>
                                    <Room>
                                        <ID><xsl:value-of select="PropertyRoomTypeID" /></ID>
                                        <Type><xsl:value-of select="RoomType" /></Type>
                                        <Board><xsl:value-of select="MealBasis" /></Board>
                                        <Rate><xsl:value-of select="Total" /></Rate>
                                    </Room>
                                </Room_3>    
                            </xsl:if>                                                           
                        </xsl:for-each>    
                    </xsl:if>     
                </Rooms>
                <facility></facility>
            </Hotel>
        </xsl:for-each>
        </session>
</NativeResult>
</xsl:template>
</xsl:stylesheet>